home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / AEA / Source / Sources / Object Models / AEAModelSub.cc < prev   
Encoding:
C/C++ Source or Header  |  2000-06-24  |  864 b   |  48 lines

  1. /*    ==============
  2.  *    AEAModelSub.cc
  3.  *    ==============
  4.  */
  5.  
  6. #include "AEADebugging.h"
  7.  
  8. #include <AEBuild.h>
  9.  
  10. #include "AEAModelSub.hh"
  11. #include "AEATokenModel.hh"
  12. #include "AEADesc.hh"
  13.  
  14. void
  15. AEAModelSub::GetKeyData(DescType inKeyForm, AEDesc &outAEDesc) const
  16. {
  17.     outAEDesc.descriptorType = typeNull;
  18.     outAEDesc.dataHandle = NULL;
  19. }
  20.  
  21. void
  22. AEAModelSub::GetContainerObjSpec(AEDesc &containerSpec) const
  23. {
  24.     Container().MakeObjSpecifier(containerSpec);
  25. }
  26.  
  27. void
  28. AEAModelSub::MakeObjSpecifier(AEDesc &outAEDesc) const
  29. {
  30.     OSErr err;
  31.     AEDesc containerSpec;
  32.     DescType keyForm;
  33.     AEADesc keyData;
  34.     
  35.     keyForm = PreferredKeyForm();
  36.     GetKeyData(keyForm, keyData.Ref());
  37.     
  38.     GetContainerObjSpec(containerSpec);
  39.     
  40.     err = ::AEBuild(&outAEDesc, 
  41.         "obj{want:type(@), form:enum(@), seld:@, from:@}", 
  42.         Class(), 
  43.         keyForm, 
  44.         &keyData.Ref(), 
  45.         &containerSpec);
  46.     ThrowIfOSErr_(err);
  47. }
  48.